import javax.swing.*;
import java.awt.event.*;

public class TFrame extends JFrame {
	private static JDesktopPane mainFrame = new JDesktopPane();

	public static JDesktopPane getMainFrame() {
		return mainFrame; 
	}
   
	public TFrame()
	{
		super("Wireless Sensor Network Simulator");
		add(mainFrame);
		
		TNetwork network = new TNetwork();
		
		TControlView ctrlView = network.newCtrlView("Preferences:");
		mainFrame.add(ctrlView.getFrame());
		ctrlView.showFrame();
		
		TNetworkView netView = network.newView("Network view:");
		mainFrame.add(netView.getFrame());
		netView.showFrameAtRightOf(ctrlView.getFrame());
		ctrlView.applyChanges();
	}
}
